//
//  PaySuccessViewController.m
//  KiklinkApp
//
//  Created by LJC on 14/10/24.
//  Copyright (c) 2014年 Kiklink. All rights reserved.
//

#import "PaySuccessViewController.h"

#import "UIColor+hex.h"

#import "MeViewController.h"

@interface PaySuccessViewController ()

@end

@implementation PaySuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"支付结果";
    self.view.backgroundColor = [UIColor colorWithHexString:AppColor_BackGround];
    self.navigationItem.hidesBackButton = YES;
    
    
    //success
    [self.success.layer setCornerRadius:5];
    [self.success addTarget:self action:@selector(successAction) forControlEvents:UIControlEventTouchUpInside];

}

- (void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:animated];
    self.tabBarController.tabBar.hidden = YES;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

#pragma mark - successAction
- (void)successAction
{
    [self.navigationController popToRootViewControllerAnimated:NO];
    UITabBarController *tabBar = (UITabBarController *)self.view.window.rootViewController;
    tabBar.selectedIndex = 3;
    UINavigationController *meNAV = [tabBar.viewControllers objectAtIndex:3];
    MeViewController *meVC = (MeViewController *)[meNAV.viewControllers objectAtIndex:0];
    [meVC pushToAllPaylist];
}
#pragma mark - successAction End

@end
